﻿namespace CodingExercises._1_25;

public class CalculateShippingCost
{
    // 根据订单总数和客户状态计算运费
    public static decimal Method(decimal orderTotal, bool isPremiumCustomer)
    {
        return orderTotal switch
        {
            < 50 when !isPremiumCustomer => 10,
            < 50 when isPremiumCustomer => 5,
            >= 50 when !isPremiumCustomer => 5,
            >= 50 when isPremiumCustomer => 0
        };
    }
}